<template>
    <div class="home">
      <h1>{{ weather }}</h1>
      <button @click="toggleWeather">切换天气</button>
    </div>
  </template>
  
  <script>

  export default {
    name: 'HomeView',
    data(){
      return {
       isHot:true
      }
    },
    methods:{
        toggleWeather(){
            this.isHot = !this.isHot;
        }
    },  
    computed:{
        weather:{
            get(){
                return this.isHot?"炎热发疯":"凉爽之极"
            }
        }
    },
    components: {
    },
  }
  </script>
   